{% extends "base.html" %}
{%  block content %}
<div id="content-header">
	<h1>Company Records</h1>
</div>

<div id="breadcrumb">
    <a href="index.html" title="Go to Home" class="tip-bottom">Home</a> <a href="/Company/"
    class="tip-bottom">Company System</a> <a href="#" class="current">Employee Details</a>
</div>
					{% for doc in e.docs.objects.all %}
						<tr>
							<td><a  href="/Company/{{company.pk}}/doc/{{doc.id}}">{{ doc.name}} </a></td>
							<td><a  href="/Company/{{company.pk}}/doc/{{doc.id}}">{{ doc.expDate}} </a></td>
							<td><a class="btn " href="{{ doc.document.url }}">Download</a></td>
						</tr>
					{%  endfor %}
<br />
<div class="span10 center" style="text-align: center;">					
						<ul class="quick-actions-horizontal">
							<li>
								<a href="#">
									<i class="icon-calendar"></i>
									<span>Add Iqama</span>
								</a>
							</li>
							<li>
								<a href="#">
									<i class="icon-shopping-bag"></i>
									<span>Add Contract </span>
								</a>
							</li>
							<li>
								<a href="#">
									<i class="icon-database"></i>
									<span>Add Passport</span>
								</a>
							</li>
							<li>
								<a  href="/Company/{{e.company.pk}}/viewEmployee/{{e.id_no}}/addDocument">
									<i class="icon-people"></i>
									<span>Add General Document</span>
								</a>
							</li>
							<li>
								<a href="#">
									<i class="icon-lock"></i>
									<span>Add Dependent</span>
								</a>
							</li>
							<li>
								<a href="#">
									<i class="icon-piechart"></i>
									<span>DELETE</span>
								</a>
							</li>
						</ul>
					</div>

<br /><br /><br /><br /><br />
<div class="container-fluid">
{% if e.picture  %}
<div class="row-fluid offset1">
		<div class="span3 offset10">	
			<div class="widget-box widget-calendar">
				<div class="widget-title"><span class="icon"><i class="icon-calendar"></i></span><h5>{{e}}'s Picture</h5></div>
					<div class="widget-content form-horizontal ">
   <div class="control-group">
					<img src="{{e.picture.url}}" alt="Big Boat">
</div>
    					
					</div>
			
				
				</div>
			</div>
		</div>
{% endif %}

<br />
	<div class="row-fluid">
		<div class="span6">	
			<div class="widget-box widget-calendar ">
				<div class="widget-title"><span class="icon"><i class="icon-calendar"></i></span><h5>Basic Information</h5></div>
					<div class="widget-content  form-horizontal">
							   <div class="control-group">
        						  <label >ID Number: {{e.id_no}}</label>
    						   </div>					
    						   <div class="control-group">
        						  <label ">Name: {{e.firstName}} {{e.middleName}} {{e.thirdName}} {{e.lastName}}</label>
    						   </div>

    						    <div class="control-group" >
        						  <label>Name: {{e.aFirstName}} {{e.aMiddleName}} {{e.aThirdName}} {{e.aLastName}}</label>
    						   </div>
    						    <div class="control-group">
        						  <label>Address 1:  {{e.address1}} </label>
    						   </div>
    						    <div class="control-group">
        						  <label>Address 2:  {{e.address2}} </label>
    						   </div>
    						    <div class="control-group">
        						  <label>City: : {{e.city}}  Zip Code: {{e.zipCode}} </label>
    						   </div>
    						    <div class="control-group">
        						  <label>Country:  {{e.Country}} </label>
    						   </div>
								<div class="control-group">
        						  <label>Religion : {{e.religion}} </label>
    						   </div>
								<div class="control-group">
        						  <label>BANK IBAN : {{e.bankAccount}} </label>
    						   </div>
								<div class="control-group">
        						  <label>Marital Status : {{e.maritalStatus}} </label>
    						   </div>
								<div class="control-group">
        						  <label>Nationality : {{e.nationality}} </label>
    						   </div>
								<div class="control-group">
        						  <label>Sex : {{e.sex}} </label>
    						   </div>
								<div class="control-group">
        						  <label>Birth date : {{e.birthDate}} </label>
    						   </div>
								<div class="control-group">
        						  <label>Hijri Birthdate : {{e.birth_day}}-{{e.birth_month}}-{{e.birth_year}} </label>
    						   </div>


				
				</div>
			</div>
		</div>
	<div class="row-fluid">
		<div class="span6">	
			<div class="widget-box widget-calendar">
				<div class="widget-title"><span class="icon"><i class="icon-calendar"></i></span><h5>Employment Information</h5></div>
					<div class="widget-content form-horizontal ">


							   <div class="control-group">
        						  <label >Sponsor {{e.sponsor}}</label>
    						   </div>					
    						   <div class="control-group">
        						  <label ">Company: {{e.company}}</label>
    						   </div>

    						    <div class="control-group" >
        						  <label>Job Title: {{e.jobTitle}}</label>
    						   </div>
    						    <div class="control-group">
        						  <label>Work License  {{e.work_liscense}} </label>
    						   </div>
    						    <div class="control-group">
        						  <label>Inssurance Number {{e.inssurance_number}} </label>
    						   </div>
    						    <div class="control-group">
        						  <label>Number of dependents: : {{e.dependents.count}} </label>
    						   </div>
    					
					</div>
			
				
				</div>
			</div>
		</div>
</div>



<div class="row-fluid">
		<div class="span12">	
			<div class="widget-box widget-calendar">
				<div class="widget-title"><span class="icon"><i class="icon-calendar"></i></span><h5>Related Documents</h5></div>
					<div class="widget-content form-horizontal ">


				 <table class="table table-bordered table-striped">

				<tr>
					<th> Name </th>
					<th> End Date </th>
					<th> download link</th>
				</tr>
					{% for doc1 in e.docs.all %}
						<tr>
							<td><a  href="/Company/{{company.pk}}/doc/{{doc1.id}}">{{ doc1.name}} </a></td>
							<td><a  href="/Company/{{company.pk}}/doc/{{doc1.id}}">{{ doc1.expDate}} </a></td>
							<td><a class="btn " href="{{ doc1.url }}">Download</a></td>
						</tr>
					{%  endfor %}
		
				</table>
    					
					</div>
			
				
				</div>
			</div>
		</div>

<div class="row-fluid">
		<div class="span12">	
			<div class="widget-box widget-calendar">
				<div class="widget-title"><span class="icon"><i class="icon-calendar"></i></span><h5>Related Documents</h5></div>
					<div class="widget-content form-horizontal ">


				 <table class="table table-bordered table-striped">

				<tr>
					<th> Name </th>
					<th> End Date </th>
					<th> download link</th>
				</tr>
					{% for dependent in e.dependents.all %}
						<tr>
							<td><a  href="/Company/{{company.pk}}/doc/{{dependent.id_no}}">{{ dependent}} </a></td>
							<td><a  href="/Company/{{company.pk}}/doc/{{dependent.id_no}}">{{ dependent.id_no}} </a></td>
							<td><a class="btn " href="{{ doc1.id_now }}">Download</a></td>
						</tr>
					{%  endfor %}
		
				</table>
    					
					</div>
			
				
				</div>
			</div>
		</div>
{% endblock %}
